package example.com.zyfypt_618zgm.model;


import retrofit2.Call;

import java.util.List;

import example.com.zyfypt_618zgm.bean.ModBean;
import example.com.zyfypt_618zgm.iface.Modiface;
import example.com.zyfypt_618zgm.service.ModService;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by 小茗同学 on 2017/6/1.
 */

public class ModModel implements Modiface {
    private Retrofit retrofit;
    private String BASEURL="http://amicool.neusoft.edu.cn/";

    public ModModel() {
        retrofit =new Retrofit.Builder().baseUrl(BASEURL).addConverterFactory(GsonConverterFactory.create()).build();
    }

    @Override
    public Call<List<ModBean>> getResultList(String mod, int page, String sessionID) {
        ModService articeservice =retrofit.create(ModService.class);
        return articeservice.getArticleList(mod,page,sessionID);
    }
    public Call<List<ModBean>> getSpecialList(String mod, int page, String sessionID) {
        ModService articeservice2 =retrofit.create(ModService.class);
        return articeservice2.getspecialList(mod,page,sessionID);
    }
}
